The present invention relates to a graphic data generating apparatus, a graphic data generation method, and a medium for the same, more particularly relates to a graphic data generating apparatus, a graphic data generation method, and a medium for the same able to be used for comprehensive editing of a script etc. activated in accordance with an operation of a client (user) with respect to a shape and position of a three-dimensional graphic able to be used for expression of an object in a three-dimensional virtual space and with respect to a displayed three-dimensional image.
More specifically, the present invention relates to a graphic data generating method able to use a script expert to prepare a template of script and thereby automatically compile script by an interactive operation, a graphic data generating apparatus for working the same, and a medium for mediating a program for working the graphic data generating method.
As a description language capable of comprehensive handling three-dimensional information using the framework of the WWW (World Wide Web) providing various types of information on the Internet, that globally constructed computer network, the VRML (virtual reality modeling language) has been known.
First, an explanation will be given of the historical background up to the development of the VRML.
As an information system able to be used on the Internet, the WWW developed by the Swiss CERN (European Center for Nuclear Research) is known. The WWW was designed to enable text, images, sound, and other multimedia data to be viewed and heard by a hyper text format and asynchronously transfers to personal computers and other terminal equipment information stored in WWW servers based on protocol called HTTP (Hyper Text Transfer Protocol). The WWW is basically comprised of servers and browsers.
A WWW server is comprised of server software known as an HTTP daemon and HTML (Hyper Text Makeup Language) files storing hyper text information. A xe2x80x9cdaemonxe2x80x9d is a program which manages and processes information in the background when working on UNIX.
Hyper text information is expressed by a description language called the HTML. Hyper text is described by HTML by the expression of the logical structure of sentences by format designations known as xe2x80x9ctagsxe2x80x9d surrounded by xe2x80x9c less than xe2x80x9d and xe2x80x9c greater than xe2x80x9d. Links with other information are described by link information known as xe2x80x9canchorsxe2x80x9d. When designating a location of information by anchors, a URL (Uniform Resource Locator) is used.
The protocol for transferring a file described in HTML on a TCP/IP (Transmission Control Protocol/Internet Protocol) network is HTTP. HTTP functions to send a request for transfer of information from a client to a WWW server and transfer hyper text information of an HTML file to the client.
A WWW browser is often used as the environment for uses of the WWW. xe2x80x9cBrowsexe2x80x9d means to freely view. A browser executes the work for inquiring about information to a server in accordance with an operation of a user. A WWW browser is Netscape Navigator (trademark of Netscape Communications Corporation of the U.S.) and other client software. It is possible to use a WWW browser to browse through files, that is, home pages, of WWW servers on the globally expanding Internet, corresponding to a URL, and possible to successively follow back linked home pages to access various sources of information on the WWWxe2x80x94called xe2x80x9cnet surfingxe2x80x9d.
In recent years, the WWW has further expanded. Specifications for description languages for three-dimensional graphics, called VRML, have been formulated enabling description of three-dimensional spaces and setting hyper text links for objects drawn by three-dimensional graphics and enabling successively-access of WWW servers while following back the links. VRML browsers are being developed for displaying three-dimensional spaces described based on such VRML specifications.
Details of VRML are described for example in the reference xe2x80x9cVRML o Shiru: 3-Jigen Denno Kukan no Kochiku to Buraujingu (Learn About VRML: Building and Browsing Three-Dimensional Computer Space)xe2x80x9d, written by Mark Pesce, translated by Koichi Matsuda, Terunao Kamachi, Shoichi Takeuchai, Yasuaki Honda, Junichi Toshimoto, Masayuki Ishikawa, Ken Miyashita, and Kazuhiro Hara, first edition published Mar. 25, 1996, published by Prentis Hall, ISBN4-931356-37-0 (original work: xe2x80x9cVRML: Browsing and Building Cyberspacexe2x80x9d, Mark Pesce, 1995 New Readers Publishing, ISBN 1-56205-498-8) and the reference xe2x80x9cVRML no Saishin Doko to CyberPassage (Recent Trends in VRML and CyberPassage)xe2x80x9d, Koichi Matsuda and Yasuaki Honda, bit (published by Kyoritsu)/1996, Vol. 28, No. 7, pp. 29 to 36, No. 8, pp. 57 to 65, No. 9, pp. 29 to 36, and No. 10, pp. 49 to 58).
The formal and complete specifications in xe2x80x9cThe Virtual Reality Modeling Language Version 2.0xe2x80x9d, ISO/IEC CD 14772, Aug. 4, 1996 are disclosed at the following home page address:
http://www.vrml.org/Specifications/VRML2.0/FINAL/spec/ind ex.html
The Japanese language version is disclosed at the following home page address:
http://www.webcity.co.jp/info/andoh/vrml2.0/spec-jp/index.html
As a VRML 2.0 browser and shared server software, for example, the present applicant, Sony Corporation, has developed and is marketing xe2x80x9cCommunity Place (trademark) Browser/Bureauxe2x80x9d. The xcex2-version (test version) can be downloaded from the Internet home page http://vs.sony.co.ip).
In the VRML 2.0, it is possible to describe and express autonomous behavior of an object in a three-dimensional virtual space. When using VRML 2.0 to prepare VRML content where an object moves around in a three-dimensional virtual space, normally the following process of work is undergone. Note that below the set of a VRML file, script file, etc. for realizing behaviors of a series of objects in a single virtual space is called xe2x80x9cVRML contentxe2x80x9d.
The general routine for preparing VRML content is described below.
(1) Preparation of Model
The shape, position, etc. of an object (model) arranged in a virtual space are described based on VRML 2.0 to prepare a basic VRML file.
(2) Description of Sensor Node
TouchSensors generating events in the case of click operation by a mouse (pointing operation) on objects in the virtual space, a TimeSensor generating an event when a predetermined time arrives, and other sensor nodes is added to the VRML file.
(3) Description of Routing
The description of the routing for transmission of events generated in accordance with pointing operations with respect to objects to which sensor nodes have been added is added to the VRML file.
(4) Description of Script Node
The description of a script node for transfer of events transmitted by the routing to and from an external script is added to the VRML file.
(5) Preparation of Script File
A script (program) in the Java language (Java is a trademark of Sun Microsystems of the U.S.) for realizing predetermined behavior for objects in the virtual space based on events; transmitted through the script node is described to prepare a script file.
The desired VRML content is prepared by the process of description of the above (1) to (5).
When desiring to prepare VRML content accompanying the autonomous behavior of an object in a virtual space based on VRML 2.0, an existing authoring software, called a modeler, for example, 3D Studio Max (trademark), or other software is used to prepare the shape of the object or animation and output the same in the VRML 2.0 format. When the modeler does not support the VRML 2.0 format, it is necessary to use a converter etc. to convert to the VRML 2.0 format.
Further, descriptions of various sensor nodes etc. defined by the VRML 2.0 are added to the VRML file using a text editor, scripts in the Java language are prepared using a text editor, corresponding script nodes are added, routes are added, etc. repeatedly.
Finally, when confirming the actual operation, a VRML browser compatible with VRML 2.0 is activated and the behavior of the object is confirmed by a click operation by a mouse etc.
This method of preparing VRML content features an extremely large amount of complicated work and remarkably poor work efficiency. For example, when adding a field to a script node, it is necessary to revise both the script file and the VRML file. Further, it is necessary to maintain a match between the two.
When designating routing of an event as well, further, it is necessary to ensure a match of the type of the event (format of data). If the format of description of the event etc. is mistaken, when reading by a VRML browser, a composition error will arise and it is necessary to again revise the file. Further, each time a node is added, re-reading by the VRML browser is necessary, so the work efficiency is extremely poor.
Points have been found in the performance of the interactive operation in the conventional method which should be improved. One example of a defect in the interaction is the trouble and inefficiency of the confirmation operation when preparing a world. FIG. 1 is a flow chart of the routine of a conventional method of preparation of a world. The production of the world is classified the two. In the first, the model is produced, and in the second, the interaction is produced. Details will be discussed later in comparison with embodiments of the present invention, but while confirmation is necessary when preparing a world, in the convention method of preparation shown in FIG. 1, as illustrated at step 108, it is necessary to separately use a VRML browser. That is, each time confirming an object in a three-dimensional space expressed by a revised VRML file, it is necessary to activate a VRML browser and designate reading of the revised VRML file or, even when a VRML browser has already been activated, to designate repeat reading of the revised file. The work efficiency in preparing the VRML content was therefore extremely poor.
Further, script is used for making a more interactive world using Java or another language, but it is known that it is difficult to prepare script due to the preparation of content. In particular, the part connecting the Java language and VRML is difficult.
An object of the present invention is to provide a graphic data generating method overcoming the problem of preparation of script and enabling script to be easily prepared, a graphic data generating apparatus for working the graphic data generating method, and a medium for mediating a program for execution of the graphic data generating method.
In the present invention, to overcome the above problems, a Script Expert has been newly developed. The Script Expert prepares a template of script by interactive operation and enables automatic compilation of script when confirming operation by user operation. As a result, there is no need for input of a character string of commands (command line) for preparing the script. Further, it is possible to greatly shorten the time for the user to prepare content of the three-dimensional virtual space by VRML 2.0.
According to a first aspect of the present invention, there is provided a graphic data generating method including a step of displaying predetermined information in a virtual space in a window of a screen of a display device; a step of inputting script preparation data to prepare a source program for the script for realizing an event generated in response to an operation instruction on an object displayed in a window of the display device; a step of inputting routing data and routing establishing correspondence among nodes including the generated data and the prepared script; a step of responding to an execution instruction and compiling a source program of said prepared script to prepare an object program of said script; and a step of responding to input of the execution instruction data, displaying a graphic indicated by the object in a window, and executing at least an object program of the script corresponding to an object in response to the operation instruction from an operation instructing means with respect to the displayed object.
Preferably, further provision is made of a step of displaying an input image used for input of the image preparation data, script preparation data, and routing data and inputting the data input in accordance with the displayed input image.
More preferably, the source program preparation step includes an input-output value setting step of setting values of input and output of script; a template preparation step of preparing a template of a source program of the script compatible with the set values of the input and output of the script, and a source program editing step of editing the template of the source program of the script prepared to prepare the source program of the desired script.
More preferably, the source program preparation step has a source program modification step of modifying the source program so as to be compatible with the set values of the input and output of the script.
According to a second aspect of the invention, there is provided a graphic data generating apparatus for executing the above graphic data generating method. That is, the graphic data generating apparatus has a display processing means of displaying predetermined information in a virtual space in a window of a screen of a display device; an operation instruction means operating linked with the display device enabling interactive operation between the displayed matter displayed on the display device and a user; a source program preparing means for inputting script preparation data and preparing a source program of a script for realizing an event generated in response to an operation instruction on an object displayed in a window of the display device; a routing means for receiving routing data and routing establishing correspondence among nodes including the generated data and the prepared script; an object program preparing means for responding to an execution instruction from the operation instructing means and compiling a source program of said prepared script to prepare an object program of the script; and a displaying and executing means for responding to input of the execution instruction data from the operation instructing means, displaying a graphic indicated by the object in a window, and executing at least an object program of the script corresponding to an object in response to the operation instruction from an operation instructing means with respect to the displayed object.
According to a third aspect of the present invention, there is provided a medium for mediating a program executing the above graphic data generating method. That is, the medium for mediating the program is a medium for executing a graphic data generating method having a step of displaying predetermined information in a virtual space in a window of a screen of a display device; a step of inputting script preparation data to prepare a source program for the script for realizing an event generated in response to an operation instruction on an object displayed in a window of the display device; a step of inputting routing data and routing establishing correspondence among nodes including the generated data and the prepared script; a step of responding to an execution instruction and compiling a source program of said prepared script to prepare an object program of said script; and a step of responding to input of the execution instruction data, displaying a graphic indicated by the object in a window, and executing at least an object program of the script corresponding to an object in response to the operation instruction from an operation instructing means with respect to the displayed object.
The medium for mediating the program is mediated in a computer system. Alternatively, it is transmitted over a network system.